<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<jqMvcGrid.Models.Product>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Edit
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% using (Html.BeginForm())
       {%>
    <fieldset>
        <legend>Edit <%= Model.ProductName %></legend>
        <p>
            <%= Html.Hidden("ProductID", Model.ProductID) %>
            <%= Html.ValidationMessage("ProductName") %>
        </p>
        <p>
            <label for="ProductName">
                ProductName:</label>
            <%= Html.TextBox("ProductName", Model.ProductName) %>
            <%= Html.ValidationMessage("ProductName", "*") %>
        </p>
        <p>
            <label for="SupplierID">
                SupplierID:</label>
            <%= Html.TextBox("SupplierID", Model.SupplierID) %>
            <%= Html.ValidationMessage("SupplierID", "*") %>
        </p>
        <p>
            <label for="CategoryID">
                CategoryID:</label>
            <%= Html.TextBox("CategoryID", Model.CategoryID) %>
            <%= Html.ValidationMessage("CategoryID", "*") %>
        </p>
        <p>
            <label for="QuantityPerUnit">
                QuantityPerUnit:</label>
            <%= Html.TextBox("QuantityPerUnit", Model.QuantityPerUnit) %>
            <%= Html.ValidationMessage("QuantityPerUnit", "*") %>
        </p>
        <p>
            <label for="UnitPrice">
                UnitPrice:</label>
            <%= Html.TextBox("UnitPrice", String.Format("{0:F}", Model.UnitPrice)) %>
            <%= Html.ValidationMessage("UnitPrice", "*") %>
        </p>
        <p>
            <label for="UnitsInStock">
                UnitsInStock:</label>
            <%= Html.TextBox("UnitsInStock", Model.UnitsInStock) %>
            <%= Html.ValidationMessage("UnitsInStock", "*") %>
        </p>
        <p>
            <label for="UnitsOnOrder">
                UnitsOnOrder:</label>
            <%= Html.TextBox("UnitsOnOrder", Model.UnitsOnOrder) %>
            <%= Html.ValidationMessage("UnitsOnOrder", "*") %>
        </p>
        <p>
            <label for="ReorderLevel">
                ReorderLevel:</label>
            <%= Html.TextBox("ReorderLevel", Model.ReorderLevel) %>
            <%= Html.ValidationMessage("ReorderLevel", "*") %>
        </p>
        <p>
            <label for="Discontinued">
                Discontinued:</label>
            <%= Html.TextBox("Discontinued", Model.Discontinued) %>
            <%= Html.ValidationMessage("Discontinued", "*") %>
        </p>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
    <% } %>
    <div>
        <%=Html.ActionLink("Back to List", "Index") %>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>
